#include<math.h>
class Solution {
public:
    bool judgeSquareSum(int c) {

        for (long long j = 0; j * j <= c; j++)
        {
            auto d = sqrt(c - j * j);
            if (d == (int)d)
                return true;
        }
        return false;
    }
};